package edu.chen.dto.execution;

import edu.chen.entity.Lease;
import edu.chen.enums.LeaseStateEnum;

public class LeaseExecution {
    private int book_id;  //书本id

    private int state;      //租借结果
    private String stateInfo;   //租借结果标识

    private Lease lease;    //成功对象

    //租借失败
    public LeaseExecution(int book_id, LeaseStateEnum leaseStateEnum) {
        this.book_id = book_id;
        this.state = leaseStateEnum.getState();
        this.stateInfo = leaseStateEnum.getStateInfo();
    }

    public LeaseExecution(int book_id, LeaseStateEnum leaseStateEnum,Lease lease) {
        this.book_id = book_id;
        this.state = leaseStateEnum.getState();
        this.stateInfo = leaseStateEnum.getStateInfo();
        this.lease = lease;
    }
    public int getBook_id() {
        return book_id;
    }
    public int getState() {
        return state;
    }
    public String getStateInfo() {
        return stateInfo;
    }
    public Lease getLease() {
        return lease;
    }

}
